/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package extension.room.tienlen;

import extension.game.room.RoomExtension;
import extension.tienlen.handler.FightCardHandler;
import extension.tienlen.handler.SkipTurnHandler;
import extension.tienlen.handler.TemHandler;
import extension.tienlen.handler.TimeOutHandler;

/**
 *
 * @author daz 
 */
public class NorthTienlenExtension extends RoomExtension {

    private NorthTienlenGame tienlenGame;
    private TienlenResponse response;

    @Override
    public void init() {
        prefixLength = 2;
        startupRoom();

    }

    @Override
    public void addHandler() {
        super.addHandler();
        addRequestHandler("bet_money", TemHandler.class);
        addRequestHandler(TienlenCommand.FIGHT_CARD, FightCardHandler.class);
        addRequestHandler(TienlenCommand.SKIP_TURN, SkipTurnHandler.class);
        addRequestHandler(TienlenCommand.TIMER_OUT, TimeOutHandler.class);
    }

    @Override
    public NorthTienlenGame getGame() {
        return this.tienlenGame;
    }

    @Override
    public void initGame(int roomId) {
        response = new TienlenResponse(this);
        tienlenGame = new NorthTienlenGame(this, roomId);
//        tienlenGame.start();
    }

    @Override
    public TienlenResponse getResponse() {
        return this.response;
    }
}
